**** Replication Do-File ****



*** TABLE 1  /  use dataset "Data1_TPV"

bysort country: tab target_zone



*** ENDNOTE 52  /  use dataset "Data3_TPV

correlate truesupport_predict truesupport_zoneawave1
correlate bias7w1_predict bias7w1



***TABLE 2  /  use dataset "Data1_TPV"

ologit endorse1_exp i.endorse1_dummy##c.itemsum burkina chad, cluster(target_zone)
ologit endorse1_exp i.endorse1_dummy##c.education burkina chad, cluster(target_zone)
ologit endorse1_exp i.endorse1_dummy##c.employed2 burkina chad, cluster(target_zone)

ologit endorse1_exp i.endorse1_dummy##c.wealthy burkina chad, cluster(target_zone)
margins, at(endorse1_dummy==0 wealthy==1)
margins, at(endorse1_dummy==1 wealthy==1)
margins, at(endorse1_dummy==0 wealthy==0)
margins, at(endorse1_dummy==1 wealthy==0)

ologit endorse1_exp i.endorse1_dummy##c.educated burkina chad, cluster(target_zone)
margins, at(endorse1_dummy==0 educated==1)
margins, at(endorse1_dummy==1 educated==1)
margins, at(endorse1_dummy==0 educated==0)
margins, at(endorse1_dummy==1 educated==0)



* TABLE 3  /  use dataset "Data1_TPV"

regress endorse1_exp_d i.endorse1_dummy if wealthy==1, cluster(target_zone)
sum vio_rel_dummy if wealthy==1
prtesti 304 .2821613  314  .1528662 

regress endorse1_exp_d i.endorse1_dummy if wealthy==0, cluster(target_zone)
sum vio_rel_dummy if wealthy==0
prtesti 3005 .1748914 3164 .2468394

regress endorse1_exp_d i.endorse1_dummy if educated==1, cluster(target_zone)
sum vio_rel_dummy if educated==1
prtesti 702 .281663  731 .2051984

regress endorse1_exp_d i.endorse1_dummy if educated==0, cluster(target_zone)
sum vio_rel_dummy if educated==0
prtesti 2607 .1587607  2747 .2471787  



*** TABLE 4  /  use dataset "Data2_TPV"

**1:  stand alone with random zone intercept
melogit allattacks   bias7w1 burkina chad ||target_zone:, vce(cluster target_zone)
**2: control for "true" support
melogit allattacks   bias7w1 truesupport_zonewave1 burkina chad ||target_zone:, vce(cluster target_zone)
**3:  control for all spatiallag, time-varying and other commune-level controls
melogit allattacks   bias7w1 spattemplag ramadan distancetobase wealth_zoneallwaves education_zoneallwaves burkina chad ||target_zone:, vce(cluster target_zone) 



*** TABLE A1  /  use dataset "Data1_TPV"

teffects ipw (endorse1_exp) (endorse1_dummy itemsum education employed2)
tebalance summarize



*** TABLE A2  /  use dataset "Data1_TPV"

tab samplepoint_eas, gen(interviewer)
set matsize 11000
ologit endorse1_exp i.endorse1_dummy##c.itemsum i.interviewer* burkina chad, cluster(target_zone)
ologit endorse1_exp i.endorse1_dummy##c.education i.interviewer* burkina chad, cluster(target_zone)
ologit endorse1_exp i.endorse1_dummy##c.employed2 i.interviewer* burkina chad, cluster(target_zone)



*** TABLE A3  //  use dataset "Data1_TPV"

gen others_present=.
replace others_present=0 if intcomp==1
replace others_present=1 if intcomp==2
replace others_present=1 if intcomp==3
replace others_present=1 if intcomp==4
replace others_present=1 if intcomp==5
ologit endorse1_exp i.endorse1_dummy##c.itemsum i.others_present burkina chad, cluster(target_zone)
ologit endorse1_exp i.endorse1_dummy##c.education i.others_present burkina chad, cluster(target_zone)
ologit endorse1_exp i.endorse1_dummy##c.employed2 i.others_present burkina chad, cluster(target_zone)



*** TABLE A4  / use dataset "Data1_TPV"

gen wealthy7=.
replace wealthy7=0 if itemsum<7&itemsum != .
replace wealthy7=1 if itemsum>6&itemsum != .

regress endorse1_exp_d i.endorse1_dummy if wealthy7==1, cluster(target_zone)
sum vio_rel_dummy if wealthy7==1
prtesti 175 .2138192  178  .1235955

regress endorse1_exp_d i.endorse1_dummy if wealthy7==0, cluster(target_zone)
sum vio_rel_dummy if wealthy7==0
prtesti 3134 .1832774 3300 .2445455

gen wealthy5=.
replace wealthy5=0 if itemsum<5&itemsum != .
replace wealthy5=1 if itemsum>4&itemsum != .

regress endorse1_exp_d i.endorse1_dummy if wealthy5==1, cluster(target_zone)
sum vio_rel_dummy if wealthy5==1
prtesti 523 .2716857  542  .1642066 

regress endorse1_exp_d i.endorse1_dummy if wealthy5==0, cluster(target_zone)
sum vio_rel_dummy if wealthy5==0
prtesti 2786 .1686241 2936 .2520436

gen wealthy4=.
replace wealthy4=0 if itemsum<4&itemsum != .
replace wealthy4=1 if itemsum>3&itemsum != .

regress endorse1_exp_d i.endorse1_dummy if wealthy4==1, cluster(target_zone)
sum vio_rel_dummy if wealthy4==1
prtesti 774 .2641662  802  .1720698 

regress endorse1_exp_d i.endorse1_dummy if wealthy4==0, cluster(target_zone)
sum vio_rel_dummy if wealthy4==0
prtesti 2535 .1607662 2676 .2582212

gen educated6=.
replace educated6=0 if education<6&education !=.
replace educated6=1 if education>5&education !=.

regress endorse1_exp_d i.endorse1_dummy if educated6==1, cluster(target_zone)
sum vio_rel_dummy if educated6==1
prtesti 242 .2603825  249 .2048193

regress endorse1_exp_d i.endorse1_dummy if educated6==0, cluster(target_zone)
sum vio_rel_dummy if educated6==0
prtesti 3067 .1789745  3229 .2409415  

gen educated4=.
replace educated4=0 if education<4&education !=.
replace educated4=1 if education>3&education !=.

regress endorse1_exp_d i.endorse1_dummy if educated4==1, cluster(target_zone)
sum vio_rel_dummy if educated4==1
prtesti 851 .252752  893 .2217245

regress endorse1_exp_d i.endorse1_dummy if educated4==0, cluster(target_zone)
sum vio_rel_dummy if educated4==0
prtesti 2458 .1613295  2585 .2441006 

gen educated3=.
replace educated3=0 if education<3&education !=.
replace educated3=1 if education>2&education !=.

regress endorse1_exp_d i.endorse1_dummy if educated3==1, cluster(target_zone)
sum vio_rel_dummy if educated3==1
prtesti 1284 .2423832  1347 .2234595

regress endorse1_exp_d i.endorse1_dummy if educated3==0, cluster(target_zone)
sum vio_rel_dummy if educated3==0
prtesti 2025 .148627  2131 .247771 



*** TABLE A5  /  use dataset "Data2_TPV"

**1:  regression of true and overt as IVs, instead of bias and true
melogit allattacks  vio_rel_dummy_zonewave1 truesupport_zonewave1 spattemplag ramadan distancetobase wealth_zoneallwaves education_zoneallwaves burkina chad ||target_zone:, vce(cluster target_zone) difficult
**2:  rare-events logistic regression
relogit allattacks   bias7w1 spattemplag ramadan distancetobase wealth_zoneallwaves education_zoneallwaves burkina chad, cluster (target_zone) 
**3:  Model 3 with different spatial lag variable
melogit allattacks   bias7w1 spatiallagattacks ramadan distancetobase wealth_zoneallwaves  education_zoneallwaves burkina chad || target_zone:, vce(cluster target_zone)
**4 Model 3 with alternative measure of overt support
melogit allattacks   bias5w1 spattemplag ramadan distancetobase wealth_zoneallwaves education_zoneallwaves burkina chad || target_zone:, vce(cluster target_zone)

